package finalproject.mobapp.Main;

import finalproject.mobapp.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class InfoViewActivity extends Activity {
	private String poi_title = "";
	private String poi_description = "";
	private float poi_distance = 0;
	private TextView info_title;
	private TextView info_description;
	private TextView info_distance;
	
	/** Called when the activity is first created. */	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_infoview);
		
		Bundle extras = getIntent().getExtras();
		if (extras != null) {
			poi_title = extras.getString("title");
			poi_description = extras.getString("description");
			poi_distance = extras.getFloat("distance");
		} else {
			
		}
		
		info_title = (TextView) findViewById(R.id.info_title);
		info_title.setText(poi_title);
		
		info_description = (TextView) findViewById(R.id.info_description);
		info_description.setText(poi_description);
		
		info_distance = (TextView) findViewById(R.id.info_distance);
		info_distance.setText(String.valueOf(poi_distance) + " m");
	}
}
